<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改路线规则</title>

    <!--判断是否登陆-->
    <script type="text/javascript" src="../../vendor/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="../../js/config.js"></script>
    <script type="text/javascript" src="../../js/jquerySession.js"></script>
    <script type="text/javascript">
        if ($.session.get('token') == null) {
            alert("用户未登录！");
            window.location.href = "../../login.html"
        }
    </script>

    <script type="text/javascript">
        //获取url地址传递过来的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
        var id = getUrlParam("id");

        $.getJSON(baseUrl + "/matchRules/" + id, function (json) {
            if (json.meta.code == "200") {
                var data = json.data;
                $("#ruleKey").val(data.ruleKey);
                $("#ruleValue").val(data.ruleValue);
            }
        })
    </script>
</head>
<style type="text/css">
    .box {

        margin: 0px auto;
        width: 100%;

    }

    .box ul {
        margin: 0px auto;
        padding-left: 0px;
        width: 400px;
    }

    .box ul li {
        list-style-type: none;
        text-align: right;
    }

    .box ul li .route_selection {
        width: 256px;
        height: 32px;
        margin-right: 10px;
        margin-bottom: 5px;
    }

    .box ul li input {
        height: 24px;
        width: 250px;
    }

    .box ul li span, input {
        margin: 5px 10px;
    }
</style>
<body>
<div class="box">
    <form enctype="multipart/form-data"  id="addRoute">
        <ul id="voteList">
            <li><span>规则名称</span><input type="text" name="ruleKey" id="ruleKey" value="团队人数"/></li>
            <li><span>规则值</span><input type="text" name="ruleValue" id="ruleValue" placeholder="格式为  0,3"/></li>
        </ul>
    </form>
</div>
<script type="text/javascript" src="../../js/jquery.min.js"></script>
</body>
</html>